/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.objectsearch.sqlsearch;

/**
 * object that contains the information to create querys with options in the
 * comparators and ranged querys
 * 
 * @author Carlos
 */
public class DataType {

	/**
	 * the field of the database
	 */
	private String fieldName;

	/**
	 * the comparator used in the database
	 */
	private String comparator;

	/**
	 * the value of the object used to search within a comparator
	 */
	private Object value;

	/**
	 * the constructor using the fieldName, the comparator and the value used to
	 * create the statement
	 * 
	 * @param fieldName
	 *            the field of the database
	 * @param comparator
	 *            the comparator used in the database
	 * @param value
	 *            the value of the object used to search within a comparator
	 */
	public DataType(String fieldName, String comparator, Object value) {
		this.fieldName = fieldName;
		this.comparator = comparator;
		this.value = value;
	}

	/**
	 * gets the comparator used in the database
	 * 
	 * @return the comparator used in the database
	 */
	public String getComparator() {
		return comparator;
	}

	/**
	 * sets the comparator used in the database
	 * 
	 * @param comparator
	 *            the comparator used in the database
	 */
	public void setComparator(String comparator) {
		this.comparator = comparator;
	}

	/**
	 * gets the field of the database
	 * 
	 * @return the field of the database
	 */
	public String getFieldName() {
		return fieldName;
	}

	/**
	 * sets the field of the database
	 * 
	 * @param fieldName
	 *            the field of the database
	 */
	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}

	/**
	 * gets the value of the object used to search within a comparator
	 * 
	 * @return the value of the object used to search within a comparator
	 */
	public Object getValue() {
		return value;
	}

	/**
	 * sets the value of the object used to search within a comparator
	 * 
	 * @param value
	 *            the value of the object used to search within a comparator
	 */
	public void setValue(Object value) {
		this.value = value;
	}
}
